package com.ctgu.ImageRecognition.util;

import com.ctgu.ImageRecognition.vo.ResultVO;

/**
 * ClassName: ResultUtil
 * Description:
 * date: 2023/7/6 19:04
 *
 * @author 吴杰
 * @since JDK 1.8.0_31
 */
public class ResultUtil {
    public static ResultVO success(String msg,Object object){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg(msg);
        resultVO.setData(object);
        return resultVO;
    }

    public static ResultVO fail(String msg,Object object){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(-1);
        resultVO.setMsg(msg);
        resultVO.setData(object);
        return resultVO;
    }
}
